KeyedCollection.add

Adds item to this and connects to the signals emitted by item. Notifies that the length of this has changed.

$(THROWS UniqueConstraintException, if $(D this) already contains $(D item) and enforceConstraints include $(SRCTAG Enforce.unique) or $(SRCTAG Enforce.clusteredUnique).)

$(THROWS CheckConstraintException, if the item is violating any of its defined check constraints and enforceConstraints include $(SRCTAG Enforce.check).)

$(THROWS ForeignKeyException, if the item is violating any of its foreign key constraints and enforceConstraints include $(SRCTAG Enforce.foreignKey).)

$(THROWS ExclusionConstraintException, if $(D item) conflicts with any item in $(D this) via the ExclusionConstraint and enforceConstraint includes $(SRCTAG Enforce.exclusion).)

Precondition:

assert(item(s) !is null);

  1. void add(T item, Flag!"notifyChange" notifyChange)
    mixintemplate KeyedCollection(T)
    final
    void
    add
    (,
    Flag!"notifyChange" notifyChange = Yes.notifyChange
    )
  2. void add(I items, Flag!"notifyChange" notifyChange)

Parameters

notifyChange Flag!"notifyChange"

whether or not to emit this change. Should only be No if coming from itemChanged

Meta